<template>
  <div class="securityList">
    <el-card>
      <div class="set">
        <span>加班</span>
        <span>
          <el-switch
            v-model="overtiemData.enable"
            active-color="#13ce66"
            inactive-color="#cccccc"
          />
        </span>
        <i class="el-icon-setting" @click="Import('data')" />
      </div>
      <div class="set">
        <span>请假</span>
        <span>
          <el-switch
            v-model="dimissionData.enable"
            active-color="#13ce66"
            inactive-color="#cccccc"
          />
        </span>
        <i class="el-icon-setting" @click="Import('data')" />
      </div>
      <div class="set">
        <span>离职</span>
        <span>
          <el-switch
            v-model="leaveData.enable"
            active-color="#13ce66"
            inactive-color="#cccccc"
          />
        </span>
        <i class="el-icon-setting" @click="Import('data')" />
      </div>

    </el-card>
    <el-dialog title="提示" :visible.sync="dialogVisible" width="30%">
      <span style="text-align:center">
        <el-upload
          class="upload-demo"
          drag
          action="/api/user/process/deploy"
          :headers="myheader"

          :show-file-list="false"
        >
          <i class="el-icon-upload" />
          <div class="el-upload__text">将文件拖到此处</div>
        </el-upload>
      </span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">
          取 消

        </el-button>
        <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
import { getToken } from '@/utils/auth'
export default {
  data() {
    return {
      overtiemData: {
        enable: true
      },
      dimissionData: {
        enable: true
      },
      leaveData: {
        enable: true
      },
      dialogVisible: false,
      processing: false,
      popover: false,
      uploadTip: '点击上传'
    }
  },
  computed: {
    myheader() {
      return {
        Authorization: `Bearer ${getToken()}`
      }
    }
  },
  methods: {
    Import(data) {
      this.dialogVisible = true
    }

  }
}
</script>

<style lang="scss" scoped>

.set{
  border: solid 1px #ccc;
      border-radius: 3px;
      padding: 15px 30px 15px 20px;
      position: relative;
      display: inline-block;
      margin-right: 20px;
  span:first-child {
        padding-right: 15px;
        border-right: solid 1px #ccc;
        margin-right: 15px;
      }
      i{
        position: absolute;
        top: 5px;
        right: 5px;
      }
}
</style>
